package com.itheima.sh.clients.fallback;

import com.itheima.sh.clients.OrderFeignApi;
import com.itheima.sh.pojo.Order;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Component
public class OrderFeignApiFallBack implements OrderFeignApi {

    @Override
    public List<Order> findOrderByUserId(String username) {

        List<Order> orderList=new ArrayList<>();
        Order order = new Order();
        order.setUsername("OrderFeignApiFallBack");
        orderList.add(order);
        return orderList;
    }
}
